package com.danciyixue.boot.dcyx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.danciyixue.boot.dcyx.model.entity.TestAnswers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.danciyixue.boot.dcyx.model.query.TestAnswersQuery;
import com.danciyixue.boot.dcyx.model.vo.TestAnswersVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * 测试答案选项Mapper接口
 *
 * @author youlaitech
 * @since 2025-06-15 16:29
 */
@Mapper
public interface TestAnswersMapper extends BaseMapper<TestAnswers> {

    /**
     * 获取测试答案选项分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return {@link Page<TestAnswersVO>} 测试答案选项分页列表
     */
    Page<TestAnswersVO> getTestAnswersPage(Page<TestAnswersVO> page, TestAnswersQuery queryParams);

    /**
     * 根据题目ID查询所有答案选项
     *
     * @param questionId 题目ID
     * @return 答案选项列表
     */
    List<TestAnswers> findByQuestionId(@Param("questionId") Long questionId);

}
